<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"
        type="text/javascript"></script>


    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">


    <link rel="stylesheet" href="css/style.css">


</head>

<body>

    <div id="demo">
        <div align="middle">
            <form method="get">
                <input type="text" maxlength="100" style="width: 500px" value="{{.Query}}" name="q">
                <button type="submit">搜索</button>
            </form>
        </div>
        <h2>共为你找到相关结果约为{{.Hits}}个。显示从{{.Start}}起共{{len .Items}}个。</h2>

        <!-- Responsive table starts here -->
        <!-- For correct display on small screens you must add 'data-title' to each 'td' in your table -->
        <div class="table-responsive-vertical shadow-z-1">
            <!-- Table starts here -->
            <table id="table" class="table table-striped table-hover table-mc-indigo">
                <tbody>
                    {{range .Items}}
                        {{if eq .Type "xcar"}}
                        <tr>
                            <td><a href="{{.Url}}">{{.Payload.Name}}</a></td>
                            {{with .Payload}}
                            <td>{{.Name}}</td>
                            <td>{{.Price}}万元</td>
                            <td>{{.Size}}</td>
                            <td>{{.Fuel}}L/100km</td>
                            <td>{{.Transmission}}</td>
                            <td>{{.Engine}}</td>
                            <td>{{.Displacement}}L</td>
                            <td>{{.MaxSpeed}}km/h</td>
                            <td>{{.Acceleration}}s,0-100km/h</td>
                            {{end}}
                        {{end}}

                        {{if eq .Type "zhenai"}}
                        <tr>
                            <td><a href="{{.Url}}">{{.Payload.Name}}</a></td>
                            {{with .Payload}}
                            <td>{{.Gender}}</td>
                            <td>{{.Age}}</td>
                            <td>{{.Height}}cm</td>
                            <td>{{.Weight}}kg</td>
                            <td>{{.Income}}</td>
                            <td>{{.Education}}</td>
                            <td>{{.Occupation}}</td>
                            <td>{{.Hokou}}</td>
                            <td>{{.Xinzuo}}</td>
                            <td>{{.House}}</td>
                            <td>{{.Car}}</td>
                            {{end}}
                        </tr>
                        {{end}}

                    {{else}}
                    <div>没有找到相关用户</div>
                    {{end}}
                </tbody>
            </table>
            <div align="middle">
                {{if ge .PrevFrom 0}}
                <a href="search?q={{.Query}}&from={{.PrevFrom}}">上一页</a>
                {{end}}
                <a href="search?q={{.Query}}&from={{.NextFrom}}">下一页</a>
            </div>
        </div>

    </div>
    <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>



    <script src="js/index.js"></script>




</body>

</html>